home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / mpfeel.lha / MPFeel / Plurals / seq_net.h < prev    next >
Text File  |  1992-03-30  |  1KB  |  51 lines

  1. /*
  2.  * MPL Extension
  3.  *
  4.  * Author:        S.C.Merrall
  5.  *
  6.  * File:        seq_net.h
  7.  *
  8.  * Contents:     seq_next
  9.  *               seq_prev
  10.  *
  11.  * Description:    This file contains a set of macros
  12.  *              which are built on top of the Xnet functions
  13.  *              in the same way that the non wrap version of
  14.  *              the Xnet are as supplied in the mpl documentation.
  15.  *              seq_prev accesses the previous PE in iproc numbers and
  16.  *              seq_next accesses the next. 0 is returned for the edge
  17.  *              cases
  18.  *
  19.  * Change History:
  20.  *
  21.  *   Date   Name Comment
  22.  * -------- ---- -------
  23.  * 07:02:91 SCM  Created
  24.  * 20:01:91 SCM  Modified to work with paired processors
  25.  *
  26.  */
  27.  
  28. #define seq_prev(val) ((PP_iproc==0)                       \
  29.                ? 0                   \
  30.                : (PP_xnetW(1).((PP_ixproc!=PP_nxproc) \
  31.                     ? val           \
  32.                     : (PP_xnetN(1).val))))
  33.  
  34.  
  35. /*  #define seq_prev(val) ((iproc == 0) ? 0 : ((ixproc == 0) ? xnetNW[1].val \
  36.  *                                                          : xnetW[1].val))
  37.  */
  38.  
  39. #define seq_next(val) ((PP_iproc==PP_nproc)             \
  40.                ? 0                \
  41.                : (PP_xnetE(1).((PP_ixproc!=0)    \
  42.                     ? val        \
  43.                     : (PP_xnetS(1).val))))
  44.  
  45. /*  #define seq_next(val) ((iproc == nproc-1) ? 0 \
  46.  *                                            : ((ixproc == nxproc-1) \
  47.  *                                                ? xnetSE[1].val \
  48.  *                                                : xnetE[1].val))
  49.  */
  50.  
  51.